Skip to content

ci(playwright): detect hogql-parser changes with the paths filter - #125835

Merged
trunk-io[bot] merged 2 commits into
masterfrom
raul/pw-hogql-parser-filter
Oct 30, 2026
Merged

trunk-io[bot] merged 2 commits into
masterfrom
raul/pw-hogql-parser-filter

Conversation

@rnegron

@rnegron rnegron commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Problem

  • Every Playwright run fetches master to detect parser changes before tests start.
  • On 98 queue runs (2026-10-29) this took 39 s median, 373 s max (slowest).

Changes

The changes job now decides whether to build the parser.

flowchart LR
    A[changes<br/>paths filter] --> B[playwright<br/>fetch master, git diff] --> C[build parser<br/>if changed]
    class A,C phBlue;
    class B phRed;
    classDef phBlue fill:#1d4aff,stroke:#1d4aff,color:#fff;
    classDef phRed fill:#f54e00,stroke:#f54e00,color:#fff;
Loading
flowchart LR
    A[changes<br/>paths filter + hogqlParser] --> C[playwright<br/>build parser if changed]
    class A,C phBlue;
    classDef phBlue fill:#1d4aff,stroke:#1d4aff,color:#fff;
Loading
  • The existing pulls.listFiles call answers a new hogqlParser filter. No new token.
  • It diffs against the merge base, so an unrebased branch stops rebuilding a parser only master changed.
  • Master runs still skip the build.
  • Dispatched branches always build, so a forced draft run tests its own parser.

How did you test this code?

  • PR run: hogqlParser = false, build skipped.
  • Dispatch run: the fallback built the parser in 136 s.
  • Not run: a PR that changes the parser.

Test rationale: Not needed. The stubbed plan covers the changed condition.

Release status

  • None.

Docs update

  • None.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Agent: Claude Code, claude-opus-5-5

Skills: /authoring-ci-workflows, /writing-pr-descriptions, /writing-code-comments

More context for AI agents
  • Decisions: The dispatch fallback covers every non-master branch, because the trigger comment names dispatch as the way to force a draft run.
  • Follow-ups: .depot/workflows/ci-backend.yml step hogql-parser-diff fetches master and diffs common/hogql_parser/ and rust/hogql/parser/ the same way.
  • Follow-ups: Neither version builds when parser source on master is ahead of the hogql-parser pin in pyproject.toml. Comparing the setup.py version with the pin would catch it.
  • Follow-ups: The shouldRun filter does not list common/hogql_parser/**, so a parser-only PR skips E2E.
  • Read closely: The if: of "Install the working version of hogql-parser".

@rnegron rnegron self-assigned this Oct 29, 2026
@trunk-io

trunk-io Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

😎 Merged successfully - details.

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

🤖 CI report

⚠️ Trunk lane — backend Python lane

This PR is assigned to the backend Python lane. It runs backend Python tests and may merge in parallel with PRs in other lanes.

✅ Playwright — all passed

All tests passed.

View test results →

@hosthog

hosthog Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

HostHog preview — posthog-desktop-web

The previews for this PR have been torn down and no longer serve.

@parameterai

parameterai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Risk: No findings

CI-only change: replaces the per-run master fetch + git diff that gated rebuilding the hogql-parser in the Playwright workflow with a hogqlParser paths-filter output, plus an always-build fallback for workflow_dispatch on non-master branches. No production code, secrets, or permissions change; I found no security issue — the new gating never builds less often than the old logic on any trigger type.

Sentinel reviewed 8ad8ad8 · Review settings

@pr-assigner-resolver-posthog
pr-assigner-resolver-posthog Bot requested a review from a team October 30, 2026 13:53
@rnegron rnegron added the stamphog Request AI approval (no full review) label Oct 30, 2026

@stamphog stamphog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

The CI change is disclosed and has owning-team authorship plus a current-head review reporting no findings. No unresolved substantive concerns or other refusal grounds were found.

  • Author wrote 0% of the modified lines and has 89 merged PRs in these paths (familiarity MODERATE).
  • PostHog Review (Standard) reviewed the current head: no findings.
Gate mechanics and policy version
Gate Result
prerequisites ✓ all clear
deny-list ✓ no deny categories matched
size ✓ 20L, 1F substantive — within ceiling
tier ✓ T1-agent / T1a-trivial (20L, 1F, single-area, ci)
stamphog 2.6.1 .stamphog/policy.yml @ 8ad8ad8 · reviewed head 8ad8ad8

@webjunkie webjunkie left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Agent review · steered by a person

@trunk-io
trunk-io Bot merged commit 7974e78 into master Oct 30, 2026
215 checks passed
@trunk-io
trunk-io Bot deleted the raul/pw-hogql-parser-filter branch October 30, 2026 17:28
@deployment-status-posthog

deployment-status-posthog Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-10-30 18:07 UTC Run
prod-us ✅ Deployed 2026-10-30 18:23 UTC Run
prod-eu ✅ Deployed 2026-10-30 18:25 UTC Run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stamphog Request AI approval (no full review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants